package org.jeecg.common.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * @author guoyh
 * @ClassName ShopTypeEnum
 * @Description
 * @since 2020/8/26 01:05
 **/
@Getter
@AllArgsConstructor
public enum ShopTypeEnum {

    TEXT(1,"图文"),
    VIDEO(2,"视频"),
    ;

    private int code;

    private String desc;

    public static ShopTypeEnum getInstance(int code){
        return Arrays.stream(values()).filter(item -> item.getCode() == code).findFirst().orElse(null);
    }
}
